<?php

use yii\helpers\Url;
use yii\helpers\Html;
use frontend\assets\AppAsset;

$url = Url::toRoute('package-log/page', true);

/* @var $this yii\web\View */
AppAsset::register($this);
AppAsset::addScript($this, '@web/js/officeHall/packageLog/AssetPackageDetails.js');
AppAsset::addScript($this, '@web/js/officeHall/packageLog/paging.js');
AppAsset::addScript($this, '@web/js/officeHall/packageLog/operationLog.js');
AppAsset::addScript($this, '@web/js/officeHall/packageLog/pager.js');

$this->title = '资产包操作日志';
?>

<script language="javascript">
    var ajaxUrl =  '<?php echo $url;?>';
</script>

<?= Html::cssFile('@web/css/packageLog/paging.css') ?>
<?= Html::cssFile('@web/css/packageLog/obeationLog.css') ?>

<!-- 资产包详情  开始-->
<div class="container details">
    <div class="row" >
        <div class="assetPackage col-md-9">
            <p class="details-nav">
                <span>办公大厅 > </span>
                <span>查询检索 > </span>
                <span> 项目详情</span>
            </p>
            <h1>江苏盐城产业投资有限公司转让亚信源债权资产包</h1>
            <p class="psmall">
					<span>本金 :
					   <strong>7.6亿</strong>
					</span>
                <span>利息 :
						<strong>*****</strong>
					</span>
                <span>项目编号：
						<strong>D17OO-SX15-1360</strong>
					</span>
                <span>省份地区：
						<strong>山东省枣庄市</strong>
					</span>
            </p>
            <p class="psmall">
                隶属资产包：
                <strong class="dizhi">
                    <a href="###">
                        江苏盐城产业投资有限公司转让亚信源债权资产包
                    </a>
                </strong>
            </p>
            <div class="col-md-12  col-sm-12 details-btns">
                <button type="button" class="btn btn-primary details-btn  " style="width: 98px;">
                    <?php echo Html::img('@web/image/projectDetails/focus.png', ['alt' => '', 'class' => 'pull-left']) ?>
                    <span class="pull-left">关注</span>
                </button>
                <button type="button" class="btn btn-default details-btn">
                    <?php echo Html::img('@web/image/projectDetails/download.png', ['alt' => '', 'class' => 'pull-left']) ?>
                    <span class="pull-left  ">下载报告</span>
                </button>
                <button type="button" class="btn btn-default details-btn">
                    <?php echo Html::img('@web/image/projectDetails/liangDian.png', ['alt' => '', 'class' => 'pull-left']) ?>
                    <span class="pull-left  ">标记为亮点项目</span>
                </button>
                <button type="button" class="btn btn-default details-btn">
                    <?php echo Html::img('@web/image/projectDetails/quanXin.png', ['alt' => '', 'class' => 'pull-left']) ?>
                    <span class="pull-left  ">修改访问权限</span>
                </button>
                <button type="button" class="btn btn-default details-btn">
                    <?php echo Html::img('@web/image/projectDetails/tuanDui.png', ['alt' => '', 'class' => 'pull-left']) ?>
                    <span class="pull-left  ">配置团队</span>
                </button>
            </div>
        </div>

        <div class="col-md-3 assetPackage2">
            <button class="btn btn-primary pull-right ">尽调中</button>
            <div class="row">
                <div class="col-md-12 pull-right">
                    <?php echo Html::img('@web/image/projectDetails/per.png', ['alt' => '张三', 'title' => '张三', 'class' => 'pull-left']) ?>
                    <?php echo Html::img('@web/image/projectDetails/per.png', ['alt' => '张三', 'title' => '张三', 'class' => 'pull-left']) ?>
                    <?php echo Html::img('@web/image/projectDetails/per.png', ['alt' => '张三', 'title' => '张三', 'class' => 'pull-left']) ?>
                    <?php echo Html::img('@web/image/projectDetails/per.png', ['alt' => '张三', 'title' => '张三', 'class' => 'pull-left']) ?>
                </div>
            </div>
            <div class="row">
                <p class="col-md-12">16时前更新数据</p>
            </div>
        </div>
    </div>
</div>
<!-- 资产包详情  结束 -->

<!-- 页内导航   开始-->
<div class="container edit-tabs">
    <div class="row" >
        <ul class="edit-tabs-ul1">
            <li class="pull-left  edit-tabs-li1">
                基本情况
                <ul class="edit-tabs-ul2 myActiveBox" style="display: none;">>
                    <!--<li class="pull-left myActive"><a href="###">基本信息</a></li>
                    <li class="pull-left "><a href="###">司法进展</a></li>
                    <li class="pull-left "><a href="###">价值评估</a></li>
                    <li class="pull-left "><a href="###">补充说明</a></li>
                    <li class="pull-left "><a href="###">转让信息</a></li>
                    <li class="pull-left "><a href="###">流转、前期处置及维护情况</a></li>
                    <li class="pull-left "><a href="###">团队成员</a></li>-->
                </ul>
            </li>

            <li class="pull-left edit-tabs-li1 myActiveBox">
                尽调评估
                <ul class="edit-tabs-ul2" style="display: none;">
                    <!--<li class="pull-left "><a href="###">立项信息</a></li>
                    <li class="pull-left "><a href="###">团队组成</a></li>
                    <li class="pull-left "><a href="###">工作计划</a></li>
                    <li class="pull-left "><a href="###">团队受益分配</a></li>
                    <li class="pull-left "><a href="###">其他</a></li>
                    <li class="pull-left "><a href="###">报价信息</a></li>-->
                </ul>
            </li>
            <li class="pull-left edit-tabs-li1">
                审核情况
                <ul class="edit-tabs-ul2" style="display: none;">
                    <li class="pull-left myActive "><a href="###">审核状况</a></li>
                </ul>
            </li>
            <li class="pull-left edit-tabs-li1 myActiveBox active ">
                操作日志
                <ul class="edit-tabs-ul2">
                    <li class="pull-left myActive"><a href="###">操作记录</a></li>
                    <li class="pull-left "><a href="###">数据更新纪录</a></li>
                </ul>
            </li>
        </ul>
    </div>
</div>
<!-- 页内导航   结束-->


<!--操作日志-->
<div class="caoZuoRiZhi">
    <div class="container containerShadow">
        <div class="row">
            <div class="topimg">
                <div class="left pull-left">
                    <span>操作日志</span>
                </div>
                <div class="pull-right">
                    <a href="###">
                        <?php echo Html::img('@web/image/projectDetails/per.png') ?>
                    </a>
                </div>
            </div>

            <table class="tableRaius" border="0" cellspacing="0" cellpadding="0"
                   style="border-collapse:separate;border-spacing: 0;">
                <tr>
                    <td>序号</td>
                    <td>操作时间</td>
                    <td>操作人</td>
                    <td>操作内容</td>
                </tr>

                <?php if (!empty($packageLogs) && is_array($packageLogs)) { ?>
                    <?php foreach ($packageLogs as $value) { ?>
                        <tr>
                            <td><?php echo Html::encode($value['id']); ?></td>
                            <td><?php echo Html::encode($value['created_at']); ?></td>
                            <td><?php echo Html::encode($value['user_id']); ?></td>
                            <td><?php echo Html::encode($value['log']); ?></td>
                        </tr>
                    <?php } ?>
                <?php } ?>

            </table>
        </div>
    </div>
</div>


<!--数据更新记录-->
<div class="shuJuGengXin">
    <div class="container containerShadow">
        <div class="row">
            <div class="topimg">
                <div class="left pull-left">
                    <span>数据更新记录</span>
                </div>
                <div class="pull-right">
                    <select name="date">
                        <option value="1">一周内</option>
                        <option value="2" selected="selected">一个月内</option>
                        <option value="3">一个月前</option>
                    </select>

                    <select name="module">
                        <?php if (!empty($modules) && is_array($modules)) { ?>
                            <?php
                            foreach ($modules as $k => $v) {
                                echo "<option value='{$k}' >{$v}</option>";
                            }
                            ?>
                            <option value="0" selected="selected">所属模块</option>
                        <?php } ?>
                    </select>

                    <select name="user">
                        <?php if (!empty($packageUpdateLogUsers) && is_array($packageUpdateLogUsers)) { ?>
                            <?php
                            foreach ($packageUpdateLogUsers as $k => $v) {
                                echo "<option value='{$k}' >{$v}</option>";
                            }
                            ?>
                        <?php } ?>
                        <option value="0" selected>操作人</option>
                    </select>
                </div>
            </div>
            <table class="tableRaius" border="0" cellspacing="0" cellpadding="0"
                   style="border-collapse:separate;border-spacing: 0;">
                <tr id="page_list_tr">
                    <td>序号</td>
                    <td>操作时间
                        <?php echo Html::img('@web/image/projectDetails/updown.png', ['alt' => '']) ?>
                    </td>
                    <td>操作人</td>
                    <td>所属模块
                        <?php echo Html::img('@web/image/projectDetails/updown.png', ['alt' => '']) ?>
                    </td>
                    <td>操作内容</td>
                </tr>
                <?php if (!empty($data['data']) && is_array($data['data'])) { ?>
                    <?php foreach ($data['data'] as $key => $value) { ?>
                        <tr>
                            <td><?php echo Html::encode($value['id']); ?></td>
                            <td><?php echo Html::encode($value['created_at']); ?></td>
                            <td><?php echo Html::encode($value['user_id']); ?></td>
                            <td><?php echo Html::encode($value['module']); ?></td>
                            <td><?php echo Html::encode($value['log']); ?></td>
                        </tr>
                    <?php } ?>
                <?php } ?>
            </table>

            <input type="hidden" id="package_id" name="package_id" value="<?php echo $data['package_id']; ?>">

            <div class="pagingBox" style="padding-left: 222px;">
                <div id="page_list" class="pull-left" >
                    <?php echo $data['pager']; ?>
                </div>
                <div class="pull-left" style="margin: 23px 12px">
                    <span class="pageTotal pull-left">
                        <span class="pageT"></span> 每页
                        <a id="list">
                            <span class="number">20</span>
                            <ul class="pageTotalBox">
                                <li>10</li>
                                <li class="pageActive">20</li>
                                <li>30</li>
                                <li>40</li>
                                <li>50</li>
                            </ul>
                        </a>
                        <b class="caret"> </b>行
                    </span>
                    共<span class="totalSize"><?php echo $data['count']; ?> </span>条记录
                    <input type="hidden" id="current_page" value="<?php echo $data['page'] ?>" >

<!--                    <div class="form-group pull-right ">-->
<!--                        <label for="rePage">跳转到 </label>-->
<!--                        <input type="text" class="form-control" placeholder=" 0" style="display:inline-block;width: 60px; height: 30px;"-->
<!--                               id="rePage"/>-->
<!--                        页-->
<!--                    </div>-->
                </div>
            </div>

        </div>
    </div>
</div>
